STEP 13: If the user guesses the wrong word, we will tell them to try again and then run through the loop again.

  • Go to and drag if INSIDE the for loop.
  • Change the test variable to guess and the test value to word.
  • Change the == sign to !=. In Python, the symbol != means does not equal.
  • Drag Say and drop it inside the if statement.

To navigate the page using the TAB key, first press ESC to exit the code editor.

# THIS ACTIVITY IS IN PREVIEW ONLY MODE
  • Run Code
  • Submit Work
  • Next Activity
  • Show Console
  • Reset Code Editor
  • Codesters How To (opens in a new tab)